package com.czbank.financing.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.czbank.financing.service.UserAccountsService;
import com.czbank.financing.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: thinkpad
 * @Date: 2019/7/16 20:52
 * @Description:
 */
@RestController
@CrossOrigin
@RequestMapping("/userAccounts")
public class UserAccountsController {

    @Autowired
    private UserAccountsService userAccountsService;

    @RequestMapping("/AllUserAccounts")
    public Object TotalProduct(@RequestBody JSONObject jsonObject){
        System.out.println("jsonObject = " + jsonObject);
        return JSON.toJSONString(userAccountsService.TotalUserAccountsr());
    }

}
